package com.kefan.reptilemanagement.controller;


import com.kefan.reptilemanagement.common.entities.Illegal;
import com.kefan.reptilemanagement.common.entities.ResultBody;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author sjj
 * @since 2024-05-03
 */
@RestController
@RequestMapping("/illegal")
public class IllegalController extends BaseController {

    @PostMapping("/add")
    public ResultBody add(@RequestBody Illegal illegal)
    {
        return ResultBody.success(illegalService.add(illegal));
    }

    @GetMapping("/list")
    public ResultBody getList()
    {
        return ResultBody.success(illegalService.getList());
    }

    @DeleteMapping("/delete")
    public ResultBody delete(@RequestParam("id") Long id)
    {
        return ResultBody.success(illegalService.delete(id));
    }
}
